#ifndef ALARMSETTING_H
#define ALARMSETTING_H

#include <QWidget>
#include <QCalendarWidget>
#include <QMessageBox>
#include <QDialog>


namespace Ui {
class AlarmSetting;
}

class AlarmSetting : public QWidget
{
    Q_OBJECT

public:
    explicit AlarmSetting(QWidget *parent = 0);
    AlarmSetting(int t_Month, int t_Day, int t_Week, QString t_MettingAddr, QString t_MettingTime, QString t_EventContent, QWidget *parent = 0);
    ~AlarmSetting();

signals:
    void AlarmEnterSignal(int calendarMonth, int calendarDay, int calendarWeek, QString MettingTime, QString MettingAddr, QString EventContent);

private slots:
    void on_AlarmCancelPushButton_clicked();

    void on_ALarmEnterPushButton_clicked();

    void on_AlarmDatePushButton_clicked();

    void calendarChange(QDate);
private:
    void setAlarmTimeComboBoxIndex(void);

private:    
    Ui::AlarmSetting *ui;
    QCalendarWidget *calendar;
    QDialog *DLG;

    QString Year;       //年
    QString Month;      //月
    QString Day;        //日
    QString Hour;       //年
    QString Minute;     //月
    QString Second;     //日

    int Yearlocal;  //年
    int Monthlocal; //月
    int Daylocal;   //日

    int calendarYear;
    int calendarMonth;
    int calendarDay;
    int calendarWeek;//周几

    QString MettingTime; //会议时间
    QString MettingAddr; //会议地点
    QString EventContent;//事件内容

};

#endif // ALARMSETTING_H
